import Home from '@app/home'
import Demo1 from '@app/demos/demo1'
import Demo2 from '@app/demos/demo2'
import Demo3 from '@app/demos/demo3'
import MyLayout from '@app/layout'
import News from '@app/news'
import Upload from '@app/upload'
import {
  FileTextOutlined,
  ToolOutlined,
  MacCommandOutlined,
  HomeOutlined
} from '@ant-design/icons'

let appRouters = [
  {
    name: '首页',
    type: 'item',
    exact: true,
    path: '/home',
    icon: HomeOutlined,
    component: Home,
  },
  {
    name: '测试案例',
    type: 'subMenu',
    path: '/demos',
    icon: FileTextOutlined,
    children: [
      {
        name: 'demo1',
        type: 'item',
        exact: true,
        path: '/demo1',
        component: Demo1,
      },
      {
        name: 'demo2',
        type: 'item',
        exact: true,
        path: '/demo2',
        component: Demo2,
      },
      {
        name: 'demo3',
        type: 'item',
        exact: true,
        path: '/demo3',
        component: Demo3,
      },
    ]
  },
  {
    name: '实用工具',
    type: 'subMenu',
    path: '/tool',
    icon: ToolOutlined,
    children: [
      {
        name: '上传文件',
        type: 'subMenu',
        exact: true,
        path: '/upload',
        component: Upload
      },
      {
        name: '应用装修',
        type: 'item',
        path: '/layout',
        exact: true,
        component: MyLayout
      },
    ]
  },
  {
    name: '八卦天地',
    type: 'subMenu',
    path: '/gossip',
    icon: MacCommandOutlined,
    children: [
      {
        name: '新闻动态',
        type: 'subMenu',
        exact: true,
        path: '/news',
        component: News
      },
    ]
  }
]

export {
  appRouters
}